package artid.com.arttogoa.parser;

import java.io.Serializable;
import org.json.JSONObject;

/**
 * 
 *    
 * 项目名称：ArtworkArtA   
 * 类名称   ：TransactionManagementParser   
 * 类描述   ：交易管理列表实体类+解析   
 * 创建人   ：耿卫斌   
 * 创建时间：2016-7-28 上午10:23:49   
 *
 */
public class TransactionManagementParser extends AppItem implements Serializable{
	private static final long serialVersionUID = 1L;
	private String buyer_id;//买家ID
	private String buyer_nickname;//买家名字
	private String buyer_avatar;//买家头像
	private String realname;//原作者（A端艺术家真实姓名）
	private String goods_price;//价格（商品价格）
	private String order_id;//订单id
	private String order_sn;//订单编码
	private String order_state;//商品出售状态0已取消；1买家待付款;2待发货;3已发货;4已售出;5全部
	private String goods_name;//作品名（商品名称）
	private String goods_image;//完整图URL（商品主图）
	private String is_auth;//备案状态0未备案商品，1已备案商品（担保交易）
	private String ship_address;//发货地址
	@Override
	public void parse(JSONObject obj) {
		// TODO Auto-generated method stub
		if (null == obj) {
			return;
		}
		buyer_id = obj.optString("buyer_id");
		buyer_nickname = obj.optString("buyer_nickname");
		buyer_avatar = obj.optString("buyer_avatar");
		realname = obj.optString("realname");
		goods_price = obj.optString("goods_price");
		order_id = obj.optString("order_id");
		order_sn = obj.optString("order_sn");
		order_state = obj.optString("order_state");
		goods_name = obj.optString("goods_name");
		goods_image = obj.optString("goods_image");
		is_auth = obj.optString("is_auth");
		ship_address = obj.optString("ship_address");
	}
	public String getBuyer_id() {
		return buyer_id;
	}
	public void setBuyer_id(String buyer_id) {
		this.buyer_id = buyer_id;
	}
	public String getBuyer_nickname() {
		return buyer_nickname;
	}
	public void setBuyer_nickname(String buyer_nickname) {
		this.buyer_nickname = buyer_nickname;
	}
	public String getBuyer_avatar() {
		return buyer_avatar;
	}
	public void setBuyer_avatar(String buyer_avatar) {
		this.buyer_avatar = buyer_avatar;
	}
	public String getRealname() {
		return realname;
	}
	public void setRealname(String realname) {
		this.realname = realname;
	}
	public String getGoods_price() {
		return goods_price;
	}
	public void setGoods_price(String goods_price) {
		this.goods_price = goods_price;
	}
	public String getOrder_id() {
		return order_id;
	}
	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}
	public String getOrder_sn() {
		return order_sn;
	}
	public void setOrder_sn(String order_sn) {
		this.order_sn = order_sn;
	}
	public String getOrder_state() {
		return order_state;
	}
	public void setOrder_state(String order_state) {
		this.order_state = order_state;
	}
	public String getGoods_name() {
		return goods_name;
	}
	public void setGoods_name(String goods_name) {
		this.goods_name = goods_name;
	}
	public String getGoods_image() {
		return goods_image;
	}
	public void setGoods_image(String goods_image) {
		this.goods_image = goods_image;
	}
	public String getIs_auth() {
		return is_auth;
	}
	public void setIs_auth(String is_auth) {
		this.is_auth = is_auth;
	}
	public String getShip_address() {
		return ship_address;
	}
	public void setShip_address(String ship_address) {
		this.ship_address = ship_address;
	}
	public TransactionManagementParser() {
		super();
	}
	public TransactionManagementParser(String buyer_id, String buyer_nickname,
			String buyer_avatar, String realname, String goods_price,
			String order_id, String order_sn, String order_state,
			String goods_name, String goods_image, String is_auth,
			String ship_address) {
		super();
		this.buyer_id = buyer_id;
		this.buyer_nickname = buyer_nickname;
		this.buyer_avatar = buyer_avatar;
		this.realname = realname;
		this.goods_price = goods_price;
		this.order_id = order_id;
		this.order_sn = order_sn;
		this.order_state = order_state;
		this.goods_name = goods_name;
		this.goods_image = goods_image;
		this.is_auth = is_auth;
		this.ship_address = ship_address;
	}
	@Override
	public String toString() {
		return "TransactionManagementParser [buyer_id=" + buyer_id
				+ ", buyer_nickname=" + buyer_nickname + ", buyer_avatar="
				+ buyer_avatar + ", realname=" + realname + ", goods_price="
				+ goods_price + ", order_id=" + order_id + ", order_sn="
				+ order_sn + ", order_state=" + order_state + ", goods_name="
				+ goods_name + ", goods_image=" + goods_image + ", is_auth="
				+ is_auth + ", ship_address=" + ship_address + "]";
	}
}
